package com.zqw.service;

import com.zqw.info.GoodsInfo;
import com.zqw.info.UserInfo;
import com.zqw.pojo.UserPojo;

import java.util.List;

public interface UserService {

    /**
     * 登录
     * @param user
     * @return
     */
    UserInfo login(UserPojo user);

    /**
     * 	注册
     * @param user
     * @return
     */
    boolean regist(UserInfo user);

    /**
     * 	用户名唯一校验
     * @param cname
     * @return
     */
    Boolean soleName(String cname);

    /**
     * 更新购物车
     * @param
     * @return
     */
    public List<GoodsInfo> updShopCar(List<GoodsInfo> goods,String uid);

    /**
     * 添加购物项
     * @param goods
     * @param uid
     * @return
     */
    public boolean addShopCar(GoodsInfo goods,String uid);

    /**
     * 删除购物项
     * @param goods
     * @param uid
     * @return
     */
    public boolean delShopCar(GoodsInfo goods,String uid);

    /**
     * 删除购物项的个数
     * @param goods
     * @param uid
     * @return
     */
    public boolean updShopCarNum(GoodsInfo goods,String uid);

}
